package com.wuba.rxjavademo.lyz.day0505;

import com.wuba.rxjavademo.lyz.BaseDemo;

import rx.Observable;
import rx.Subscription;

/**
 * Created by liyaxing on 2016/5/18.
 */
public class Demo06 extends BaseDemo {



    public static void main(String[] ss){

        Observable observable = Observable.just(1,2,3,4,5) ;
        Subscription subscription = observable.subscribe(i -> print(i)) ;

        Observable.create(subscriber -> {
            subscriber.onNext(1111);
            subscriber.add(subscription);
        }) ;

    }

}
